<?php

namespace App\Http\Controllers\Expert\Index;

use Illuminate\Http\Request;
use Session,Config;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class IndexController extends Controller
{
    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     * 名师代理首页视图
     */
    public function index()
    {
        return view('Expert.Index.index');
    }

    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     * 名师视频课页
     */
    public function lesson()
    {
        return view('Expert.Index.lesson');
    }

    /**
     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Laravel\Lumen\Http\Redirector|void
     * 用户退出登录
     */
    public function logout()
    {
        Session::forget(Config::get('custom.setting.MEMBER_TOKEN'));
        Session::forget(Config::get('custom.setting.MEMBER_CITY'));
        Session::forget(Config::get('custom.setting.MEMBER_REGION'));
        Session::forget(Config::get('custom.setting.MEMBER_UTYPE'));
        Session::forget(Config::get('custom.setting.MEMBER_INFO'));
        Session::forget(Config::get('custom.setting.MEMBER_CODE'));
        return redirect('/');
    }


}
